package com.raymond.thread.manager;

import java.io.File;

/**
 * 静态值
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2020-08-31 14:21
 */
public class StaticValues {
    /**
     * 是否退出标识
     */
    public volatile static boolean IS_EXIT = false;

    /**
     * 是否是主服务
     */
    public volatile static Boolean IS_MAIN = true;
//    public volatile static Boolean IS_MAIN = false;
    /**
     * 程序是否停止
     */
    public volatile static Boolean IS_STOP = false;

    public static final long SERVER_ID = 1;
    /**
     * 手机号码长度
     */
    public static final int PHONE_LENGTH = 11;
    /**
     * 网关流水号长度
     */
    public static final int PTMSG_LENGTH = 10;
    /**
     * 手机号码分割符
     */
    public static final String PHONE_SPLIT = ",";
    /**
     * 默认错误的通道通道信息
     */
    public static final String CMPP_DEFAULT_CHANNEL_INFO_ERR = "0,0,0,0,0,0,*;0,0,0,0,0,0,*;0,0,0,0,0,0,*";
    /**
     * 默认正确的通道信息
     */
    public static final String CMPP_DEFAULT_CHANNEL_INFO_RIGHT = "1065799991004,1000,70,67,67,10,*;1065599991004,1000,70,67,67,10,*;1065999991004,1000,70,67,67,10,*";
    /**
     * 号码地址前四位
     */
    public static final int PHONE_AREA_LENGTH = 4;
    /**
     * 重试次数
     */
    public static final int RETRY_COUNT = 3;
    /**
     * 字符串常量 0
     */
    public static final String ZERO = "0";
    /**
     * 字符串常量 9
     */
    public static final int NINE = 9;
    /**
     * 常量12
     */
    static final int TWELVE = 12;

    /**
     * 长短信长度
     */
    public static final int LONG_SMS_LENGTH = 980;
    /**
     * 长短信最大长度
     */
    public static final int LONG_SMS_MAX_LENGTH = 2000;
    /**年月**/
    public static final String IYM = "yyyyMM";
    /**历史表名不待前缀**/
    public static final String TB_HISTORY = "TB_HISTORY";
    /**UTF-8**/
    public static final String UTF_8 = "UTF-8";

    public static final String SYS_PATH = System.getProperty("user.dir");

    /**皮肤zip文件目录名称**/
    public static final String SKIN_PATH = "skin";
    /**使用的皮肤zip文件名**/
    public static final String SKIN_ZIP = "crystal2themepack.zip";

    /**今日发送总数缓存信息**/
    public static final String SEND_CACHE_COUNT = "count";
    /**今日发送速度缓存信息**/
    public static final String SEND_CACHE_SPEED = "speed";
    /**发送缓存文件地址**/
    public static final String SEND_COUNT_CACHE_FILE_PATH = StaticValues.SYS_PATH + File.separator + "cache/sendCount.txt";
    /**
     * 缓存文件的地址
     */
    public static final String SEND_ID_CACHE_FILE_PATH = StaticValues.SYS_PATH + File.separator + "cache" + File.separator + "sendId.txt";
    /**
     * 发送速度list文件
     */
    public static final String SEND_SPEED_LIST_CACHE_FILE_PATH = StaticValues.SYS_PATH + File.separator + "cache" + File.separator + "list.txt";
    /**
     * linux打印发送速度文件的地址
     */
    public static final String SEND_SPEED_CACHE_FILE_PATH = StaticValues.SYS_PATH + File.separator + "cache" + File.separator + "monitor.txt";
    /**
     * 文件换行符
     */
    public static final String LINE = System.getProperty("line.separator");
    /**
     * 一天的毫秒数
     */
    public static final long DAY_MILLI_SECONDS = 60 * 60 * 24 * 1000;
    /**
     * 是否已读文件缓存
     */
    public volatile static boolean isReadFileCache = false;
}
